const path = require("path");
const express = require("express");
const app = express();
const {createLog} = require("./modules/middleware");
const goodsRouter = require("./router/goodsRouter");
const newsRouter = require("./router/newsRouter");
const myRouter = require("./router/myRouter");
app.use(createLog(path.join(__dirname,"/data/index.json")));
app.get("/",(req,res)=>{
	res.send("首页")
})
// 商品相关的路由
app.use(goodsRouter);
// 新闻相关的路由
app.use(newsRouter);
// 个人相关的
app.use(myRouter);


app.listen(80,"0.0.0.0",()=>{
	console.log("success");
})